# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=g3k
pkgver=0.16.0
pkgrel=2
pkgdesc="A 3DUI widget toolkit"
url="https://gitlab.freedesktop.org/xrdesktop/g3k"
arch="all"
license="MIT AND CC-BY-SA-4.0"
depends_dev="
	json-glib-dev
	libcanberra-dev
	pango-dev
	shaderc-dev
	"
makedepends="$depends_dev
	gtk-doc
	gxr-dev
	meson
	"
source="https://gitlab.freedesktop.org/xrdesktop/g3k/-/archive/$pkgver/g3k-$pkgver.tar.gz"
subpackages="$pkgname-dev"
options="!check" # Requires a working Vulkan driver

build() {
	abuild-meson \
		-Dapi_doc=false \
		-Dexamples=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
5479ae6c0432a15948a82b26c0a7ad05546a9a6f520949cc3d840dd5985f97a473455729d8fe1c93d3b318737b6c76a94db93dfa1335169557c4a680c0ec1dc0  g3k-0.16.0.tar.gz
"
